<?php
$data[0] = array(
    'shippmentId' => 123,
    'countryIso' => 'AU',
    'customerCode' => 'test001',
    'paymentTypeId' => 12,
    'packTypeId' => 1,
    'recipients' => 'tony',
    'addr1' => '地址1',
    'addr2' => '地址2',
    'city' => 'new city',
    'state' => 'shanghai',
    'zip' => 'ut 2031',
    'tel' => '186215025 ',
    'soldItems' => '',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, 'http://api.buylogic.cc/webservice/rest/addOrders?token=4f14c99cde5095c94a3578b5b1cd7389');
curl_setopt($ch, CURLOPT_POSTFIELDS, array('ordersStr' => '[{"shipmentId":182,"countryIso":"CH","recipients":"Jerome Gerber","customerCode":"213123123","addr1":"Im Rigi 25","city":"Wald ZH","state":"QLD","zip":"CH-8636","tel":"0041798609094","soldItems":[{"name":"mobile phone charger","price":5,"soldQuantity":1,"weight":0.001,"nativeName":"手机手机充电器"}]}]'));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
ob_start();
curl_exec($ch);
$return_content = ob_get_contents();
ob_end_clean();
$return_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
echo $return_code;
var_dump($return_content);
exit;